package com.czxy.domain;

import lombok.Data;

@Data
public class CartItem {
    private Product product;        //商品
    private Integer count;          //购买数量
    private Double price;           //小计：单价 * 数量

    public Double getPrice() {
        // 小计：单价 * 数量
        price = product.getShopPrice() * count;
        return price;
    }
}
